<template>
  <div>
    <!-- 个人信息查询项目 -->
    <el-select
      v-model="model.keyword"
      placeholder="请选择..."
      :style="{ width: '9rem' }"
      @change="SelectValue($event)"
    >
      <el-option
        v-for="op in itemOptions"
        :key="op.value"
        :label="op.label"
        :value="op.value"
      />
    </el-select>
    <el-input
      v-model.trim="model.keyValue"
      :style="{ width: '8rem' }"
      placeholder="请输入..."
      :disabled="keyValueD"
    />
  </div>
</template>

<script>
export default {
  name: "MyInformation",
  props: {
    model: {
      type: Object,
      default: () => {}
    },
    itemOptions: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      keyValueD: true
    }
  },
  methods: {
    SelectValue(val) {
      if (val) {
        this.keyValueD = false
      } else {
        this.keyValueD = true
      }
      this.model.keyword = val
    }
  }
}
</script>

<style></style>
